from google.appengine.dist import use_library
use_library('django', '1.2')


from google.appengine.ext.webapp.util import run_wsgi_app
from google.appengine.ext import webapp
import planning
import collab
import review
import story

application = webapp.WSGIApplication([
     ('/reqajax/', planning.MainHandler),
     ('/reqajax/iteration_planning', planning.IterationPlanningHandler),
     ('/reqajax/planning_assign_form', planning.AssignDeveloperHandler), 
     ('/reqajax/planning_name_form', planning.NameHandler),
     ('/reqajax/edit_ip_description', planning.EditIPStoryDescriptionHandler),
     ('/reqajax/planning_time_form', planning.EditTimeHandler),
     ('/reqajax/planning_priority_form', planning.PriorityHandler),
     ('/reqajax/planning_category_form', planning.CategoryHandler),
     # ('/reqajax/create_story', planning.CreateStory),
     # ('/reqajax/create_story_index', planning.CreateStoryIndex),
     ('/reqajax/move_story', planning.PostponeStoryHandler),
     ('/reqajax/comment_planning_story', planning.CommentStoryHandler),
     ('/reqajax/stories_backlog', review.StoryBackLogHandler),
     ('/reqajax/comment_review_story', review.CommentHandler),
     ('/reqajax/edit_support_comment', review.StoryObservationHandler),
     ('/reqajax/move_stories', review.CopyStories),
     #('/reqajax/review_chat', review.ChatHandler),
     ('/reqajax/story', collab.StoryHandler),
     ('/reqajax/iterations', collab.IterationHandler),
     # ('/reqajax/iteration_form_handler', collab.IterationFormHandler),
     ('/reqajax/iteration_form', collab.IterationForm),
#     ('/reqajax/create_event', planning.CreateEvent),
     ('/reqajax/projects', collab.ProjectHandler),
     ('/reqajax/project_backlog', collab.ProjectBacklogHandler),
     ('/reqajax/change_story_status_index', story.ChangeStoryStatusIndex),
     ('/reqajax/assign_form_index', story.AssignFormIndex),
     ('/reqajax/assign_form', story.AssignForm),
     ('/reqajax/update_time_worked_index', story.TimeWorkedFormIndex),
     ('/reqajax/update_time_worked', story.TimeWorkedForm),
     ('/reqajax/comment_story_index', story.CommentStoryIndex),
     ('/reqajax/comment_story', story.CommentStory),
     ('/reqajax/story_form', collab.StoryForm),
#     ('/reqajax/calendar_events', planning.EventsPage),
 ], debug=True)

def main():
    run_wsgi_app(application)

if __name__ == "__main__":
    main()

